<?php if (! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' );
class Regqq extends CI_Controller {
	
	
	public function __construct() {
		parent::__construct();
		$this->load->model('getip_model');
		$this->load->model ( 'getcookie_model' );
		$this->load->model('push_model');
	}
	public function index() {
		$json=$this->getcookie_model->getcookie($this->getip_model->checkip());
		echo $json;
	}
	public function pushcode(){
		$this->push_model->pushqq($_GET['id'],$_GET['code']);		
	}
	public function pushphone(){
		if(!isset($_GET['id'])||!isset($_GET['phone'])){
			echo '{"vip":"false","error":"no id no phone"}';
			exit();
		};
		
		$this->push_model->pushphone($_GET['id'],$_GET['phone']);
		}
	public function pushmsg(){
		if(!isset($_GET['id'])||!isset($_GET['msg'])){
			echo '{"vip":"false","error":"no id  or no msg"}';
			exit();
		};
		$user=isset($_GET['user'])?$_GET['user']:'0';
		$this->push_model->pushmsg($_GET['id'],$_GET['msg'],$user);
	}
	
}

/* End of file peccancy.php */
/* Location: ./application/controllers/welcome.php */